#include "activity.hpp"
#include "file_list.hpp"

activity_struct_csv const activity_csv::find(int _id)
{
	csv_struct csv_file(file_list::activity_filename());
	while(_id && !csv_file.eof())
	{
		++csv_file;
		activity_struct_csv row(csv_file.get_line());
			
		if(row.id() != _id) continue;
			
		return row;

	}

	activity_struct_csv activity_struct_csv_null;
	return activity_struct_csv_null;
}